﻿using System;

using Fuse8.DomainFramework.Domain;

using Fuse8.ContentManagementFramework.Domain.Commands.CommandParameters;
using Fuse8.ContentManagementFramework.Domain.Special;

namespace Fuse8.ContentManagementFramework.Domain.Commands
{
    public abstract class CmsContentGetForContentTypeCommand : BaseEntityParameterCommand<CmsContentContainer, CmsContentGetForContentTypeCommandParameter>
    {
        #region Overrides

        public override string CacheKey
        {
            get
            {
                return string.Format("ContentTypeId_{0};CurrentView_{1};TotalOnTheView_{2};SiteGroupId_{3}; SiteId_{4}",
                    CommandParameter.Id,
                    CommandParameter.CurrentView,
                    CommandParameter.TotalOnTheView,
                    CommandParameter.SiteGroupId.GetValueOrDefault(0),
                    CommandParameter.SiteId.GetValueOrDefault(0));
            }
        }

        public override string CommandName
        {
            get
            {
                return "CmsContentGetForContentTypeCommand";
            }
        }

        #endregion
    }
}
